# -*- coding: utf-8 -*-
'''
@文件    :client.py
@说明    :request客户端
@时间    :2025/08/25 16:38:04
@作者    :浪晋
@版本    :1.0
'''

import httpx

class Requests:
    def request(self, method, url, **kwargs):
        """httpx同步请求方法"""
        with httpx.Client() as client:
            response  = client.request(method, url, **kwargs)
            return response


if __name__ == '__main__':
    requests = Requests()
    def demo():
        res = requests.request("GET", "http://127.0.0.1:3456/api/debug/test/demo")
        print(res.text)
    
    demo()